<template>
  <div>
    <!-- 顶部 -->
    <nav-top class="navtop"
      >大神
      <template v-slot:gender>
        <div class="middle" v-show="!$route.meta.gender">
          <button
            :class="{ active: $store.state.ismale == 'male' }"
            @click="active('male')"
          >
            男生
          </button>
          <button
            :class="{ active: $store.state.ismale == 'female' }"
            @click="active('female')"
          >
            女生
          </button>
        </div>
      </template>
    </nav-top>
    <!-- 大神新书 -->
    <book-item :data="Naruto">
      <h3>大神新书</h3>
    </book-item>
    <!-- 白金列表 -->
    <div class="platinum">
      <div class="header">
        <h3>白金列表</h3>
      </div>
      <div class="content">
        <div class="ul">
          <li>
            <div class="imgs">
              <img src="../assets/images/ergeng.png" alt="" />
              <em>白金</em>
            </div>
            <div class="right">
              <div class="text">
                <h3>我吃西红柿</h3>
                <p>
                  阅文集团白金作家，网络文学代表性人物之一，中国作协第九届全委会委员。
                </p>
              </div>
              <div class="btn">
                <span class="iconfont icon-arrow-right-"></span>
              </div>
            </div>
          </li>
          <li>
            <div class="imgs">
              <img src="../assets/images/ergeng.png" alt="" />
              <em>白金</em>
            </div>
            <div class="right">
              <div class="text">
                <h3>我吃西红柿</h3>
                <p>
                  阅文集团白金作家，网络文学代表性人物之一，中国作协第九届全委会委员。
                </p>
              </div>
              <div class="btn">
                <span class="iconfont icon-arrow-right-"></span>
              </div>
            </div>
          </li>
        </div>
        <div class="more">
          加载更多<span class="iconfont icon-arrow-down"></span>
        </div>
      </div>
    </div>
    <!-- 大神列表 -->
    <div class="platinum god">
      <div class="header">
        <h3>大神列表</h3>
      </div>
      <div class="content">
        <div class="ul">
          <li>
            <div class="imgs">
              <img src="../assets/images/ergeng.png" alt="" />
              <em>大神</em>
            </div>
            <div class="right">
              <div class="text">
                <h3>我吃西红柿</h3>
                <p>
                  阅文集团白金作家，网络文学代表性人物之一，中国作协第九届全委会委员。
                </p>
              </div>
              <div class="btn">
                <span class="iconfont icon-arrow-right-"></span>
              </div>
            </div>
          </li>
          <li>
            <div class="imgs">
              <img src="../assets/images/ergeng.png" alt="" />
              <em>大神</em>
            </div>
            <div class="right">
              <div class="text">
                <h3>我吃西红柿</h3>
                <p>
                  阅文集团白金作家，网络文学代表性人物之一，中国作协第九届全委会委员。
                </p>
              </div>
              <div class="btn">
                <span class="iconfont icon-arrow-right-"></span>
              </div>
            </div>
          </li>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      Naruto: {
        female: [
          {
            _id: "5f9b7a995ca7a01decd02488",
            cover:
              "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F3515379%2F3515379_5ae14e481d5843768c5f9f3f92438561.jpg%2F",
            title: "神医魔后不好惹",
            author: "杨十六",
          },
          {
            _id: "5f9b7a995ca7a01decd02488",
            cover:
              "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F3515379%2F3515379_5ae14e481d5843768c5f9f3f92438561.jpg%2F",
            title: "神医魔后不好惹",
            author: "杨十六",
          },
          {
            _id: "5f9b7a995ca7a01decd02488",
            cover:
              "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F3515379%2F3515379_5ae14e481d5843768c5f9f3f92438561.jpg%2F",
            title: "神医魔后不好惹",
            author: "杨十六",
          },
          {
            _id: "5f9b7a995ca7a01decd02488",
            cover:
              "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F3515379%2F3515379_5ae14e481d5843768c5f9f3f92438561.jpg%2F",
            title: "神医魔后不好惹",
            author: "杨十六",
          },
          {
            _id: "5f9b7a995ca7a01decd02488",
            cover:
              "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F3515379%2F3515379_5ae14e481d5843768c5f9f3f92438561.jpg%2F",
            title: "神医魔后不好惹",
            author: "杨十六",
          },
          {
            _id: "5f9b7a995ca7a01decd02488",
            cover:
              "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F3515379%2F3515379_5ae14e481d5843768c5f9f3f92438561.jpg%2F",
            title: "神医魔后不好惹",
            author: "杨十六",
          },
          {
            _id: "5f9b7a995ca7a01decd02488",
            cover:
              "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F3515379%2F3515379_5ae14e481d5843768c5f9f3f92438561.jpg%2F",
            title: "神医魔后不好惹",
            author: "杨十六",
          },
        ],
        male: [
          {
            _id: "5fffff957e23d81000adc2c5",
            cover:
              "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F3522350%2F3522350_725b78de680845bf89c1fa322be5a26d.jpg%2F",
            title: "我开局震惊了女帝",
            author: "隔江",
          },
          {
            _id: "5fffff957e23d81000adc2c5",
            cover:
              "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F3522350%2F3522350_725b78de680845bf89c1fa322be5a26d.jpg%2F",
            title: "我开局震惊了女帝",
            author: "隔江",
          },
          {
            _id: "5fffff957e23d81000adc2c5",
            cover:
              "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F3522350%2F3522350_725b78de680845bf89c1fa322be5a26d.jpg%2F",
            title: "我开局震惊了女帝",
            author: "隔江",
          },
          {
            _id: "5fffff957e23d81000adc2c5",
            cover:
              "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F3522350%2F3522350_725b78de680845bf89c1fa322be5a26d.jpg%2F",
            title: "我开局震惊了女帝",
            author: "隔江",
          },
          {
            _id: "5fffff957e23d81000adc2c5",
            cover:
              "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F3522350%2F3522350_725b78de680845bf89c1fa322be5a26d.jpg%2F",
            title: "我开局震惊了女帝",
            author: "隔江",
          },
          {
            _id: "5fffff957e23d81000adc2c5",
            cover:
              "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F3522350%2F3522350_725b78de680845bf89c1fa322be5a26d.jpg%2F",
            title: "我开局震惊了女帝",
            author: "隔江",
          },
          {
            _id: "5fffff957e23d81000adc2c5",
            cover:
              "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F3522350%2F3522350_725b78de680845bf89c1fa322be5a26d.jpg%2F",
            title: "我开局震惊了女帝",
            author: "隔江",
          },
        ],
      }, // 大神新书静态数据
    };
  },
  methods: {
    active(flag) {
      this.$store.commit("setIsmale", flag);
    },
    toRouter(path, params) {
      this.$router.push({
        path: `/${path}`,
        query: { ...params },
      });
    },
  },
  created() {},
};
</script>
<style lang="less" scoped>
.navtop{
  background-color: white;
  border-bottom: 1px solid #eee;
}
.platinum {
  padding: 0.46875rem 0;
  padding-bottom: 0;
  background-color: white;
  margin-top: 15px;
  .header {
    border-left: 2.5px solid #ed424b;
    text-indent: 8px;
    margin-left: 0.46875rem;
    h3 {
      font-family: "宋体";
      font-weight: 600;
      font-size: 0.390625rem;
      position: relative;
      span {
        font-size: 0.34375rem;
        color: #777;
        font-weight: normal;
        vertical-align: botto;
      }
    }
  }
  & > .content {
    margin-top: 0.46875rem;
    width: 100%;
    .ul {
      display: flex;
      flex-direction: column;
      padding-left: 0.40625rem;
      li {
        display: flex;
        margin: 0;
        height: 2.28125rem;
        .imgs {
          font-size: 0;
          flex: 1;
          position: relative;
          img {
            width: 100%;
            height: auto;
            border-radius: 50%;
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
          }
          em {
            position: absolute;
            font-size: 0.3125rem;
            left: 50%;
            bottom: 0.18625rem;
            transform: translate(-50%, -0.2rem);
            color: white;
            background-color: #b3a7ff;
            font-style: normal;
            width: 0.9375rem;
            height: 0.4375rem;
            border-radius: 0.4375rem;
            text-align: center;
            box-shadow: 0px 0px 0.03125rem 0.03125rem white;
          }
        }
        .right {
          padding-left: 0.25rem;
          flex: 5;
          display: flex;
          align-items: center;
          border-bottom: 0.03125rem solid #8888882e;
          .text {
            h3 {
              font-size: 0.390625rem;
            }
            p {
              margin-top: 0.234375rem;
              color: #999;
              font-size: 0.34375rem;
              text-overflow: -o-ellipsis-lastline;
              overflow: hidden;
              text-overflow: ellipsis;
              display: -webkit-box;
              -webkit-box-orient: vertical;
              -webkit-line-clamp: 1;
              line-clamp: 1;
            }
          }
          .btn {
            line-height: 2.28125rem;
            flex: 0 0 0.828125rem;
            span {
              font-size: 0.46875rem;
            }
          }
        }
        &:last-child {
          .right {
            border-bottom: none;
          }
        }
      }
    }
    .more {
      font-size: 0.40625rem;
      color: #aaa;
      padding: 0.3125rem 0;
      border-top: 0.03125rem solid #8888882e;
      text-align: center;
      &:active {
        background-color: #f2f2f2;
      }
    }
  }
}
.god {
  .content {
    .ul {
      li {
        .imgs {
          em {
            background-color: #ed424b;
          }
        }
      }
    }
  }
}
</style>